# error code
ACL_ERROR_CODE = 0

# rule for mem
ACL_MEM_MALLOC_HUGE_FIRST = 0
ACL_MEM_MALLOC_HUGE_ONLY = 1
ACL_MEM_MALLOC_NORMAL_ONLY = 2

# rule for memory copy
ACL_MEMCPY_HOST_TO_HOST = 0
ACL_MEMCPY_HOST_TO_DEVICE = 1
ACL_MEMCPY_DEVICE_TO_HOST = 2
ACL_MEMCPY_DEVICE_TO_DEVICE = 3

# data format
ACL_FORMAT_UNDEFINED = -1
ACL_FORMAT_NCHW = 0
ACL_FORMAT_NHWC = 1
ACL_FORMAT_ND = 2
ACL_FORMAT_NC1HWC0 = 3
ACL_FORMAT_FRACTAL_Z = 4
ACL_FORMAT_NC1HWC0_C04 = 12
ACL_FORMAT_HWCN = 16
ACL_FORMAT_NDHWC = 27
ACL_FORMAT_FRACTAL_NZ = 29
ACL_FORMAT_NCDHW = 30
ACL_FORMAT_NDC1HWC0 = 32
ACL_FRACTAL_Z_3D = 33
ACL_FORMAT_NC = 35
ACL_FORMAT_NCL = 47

acl_dtype = {
    "dt_undefined": -1,
    "float": 0,
    "float16": 1,
    "int8": 2,
    "int32": 3,
    "uint8": 4,
    "int16": 6,
    "uint16": 7,
    "uint32": 8,
    "int64": 9,
    "uint64": 10,
    "double": 11,
    "float64": 11,
    "bool": 12,
    "string": 13,
    "complex64": 16,
    "complex128": 17,
    "bfloat16": 27,
    "int4": 29,
    "int1": 30,
    "complex32": 33,
    "hifloat8": 34,
    "float8_e5m2": 35,
    "float8_e4m3fn": 36,
    "float8_e8m0": 37,
    "float6_e3m2": 38,
    "float6_e2m3": 39,
    "float4_e2m1": 40,
    "float4_e1m2": 41,
}
